<script language="JavaScript">
<!--
function InsertAvatar()
{
	idx = document.medform.avatar_select.selectedIndex;
	document.medform.u_avatar.value =document.medform.avatar_select.options[idx].value;
	PreviewAvatar();
}

function PreviewAvatar()
{
	u_avatar = document.medform.u_avatar.value;
	if(u_avatar=="")u_avatar="default.gif";
	if( u_avatar.indexOf("/",0) == -1 )
		u_avatar="./images/avatar/" + u_avatar;
	document.images.avatar_preview.src = u_avatar;
}

function UploadAvatar()
{
	window.open( 'm_upload.php?&action=up1','_blank', 'dependent,width=500,height=150' );
}
//-->
</script>

<table width="100%" cellspacing="0" cellpadding="4" border="1" bordercolor="$color[border]">
<tr>
<td><font color="$color[hl1]">■个人设置</font> &nbsp;□<a href="m_fb.php?action=view">我的好友</a></td>
</tr>
</table>

<table  width = "100%" border="1" cellspacing="0" cellpadding="4" bordercolor="{$color['border']}" bgcolor="$color[cell]">
<form action="m_man.php" name=medform method=post >
<tr>
<td width="100">用户名</td>
<td>$udata[u_name]</td>
</tr>

<tr bgcolor="$color[cell1]">
<td><b>原密码</b></td>
<td><input type=password size=20 maxlength=32 name="old_pass"  tabindex=1> 不改密码请留空</td>
</tr>

<tr bgcolor="$color[cell1]">
<td><b>新密码</b></td>
<td><input type=password size=20 maxlength=32 name="new_pass"  tabindex=2> 不改密码请留空</td>
</tr>

<tr bgcolor="$color[cell1]">
<td><b>再次输入新密码</b></td>
<td><input type=password size=20 maxlength=32 name="new_pass2"  tabindex=3> 不改密码请留空</td>
</tr>

<tr  bgcolor="$color[cell1]">
<td><b>Email</b></td>
<td><input type=text size=20 maxlength=60 name="new_email" value="$udata[u_email]" tabindex=4>
<input type="checkbox" name="show_email" $check_show_email >公开</td>
</tr>


<tr>
<td>性别</td>
<td>
<input type=radio name="u_gender" value="1" $check_gender[1] > 男&nbsp;&nbsp;
<input type=radio name="u_gender" value="2" $check_gender[2] > 女&nbsp;&nbsp;
<input type=radio name="u_gender" value="0" $check_gender[0] > 保密&nbsp;&nbsp;
</td>
</tr>

<tr>
<td>来自</td>
<td>
<input type=text size=20 maxlength=20 name="u_from" value="$udata[u_from]" >
</td>
</tr>


<tr>
<td>
QQ
</td>
<td>
<input type=text size=20 maxlength=60 name="u_qq" value="$udata[u_qq]" >
</td>
</tr>

<tr>
<td>个人主页</td>
<td>
<input type=text size=20 maxlength=120 name="u_website" value="$udata[u_website]" > 
</td>
</tr>


<tr>
<td >
头像 
<table width = "100"  style="table-layout: fixed; word-wrap: break-word" >
<tr height = "100">
<td align="center">
<img src="$avatar_url" name="avatar_preview" id="avatar_preview">
</td>
</tr>
</table>
</td>

<td valign="bottom" align = "left">

<select name=avatar_select  onchange="InsertAvatar();">
<option selected value="$udata[u_avatar]">选择头像</option>
{$avatarlist}
</select> {$upface_link}<br />

<input type=text size=38 maxlength=255 name="u_avatar" value="$udata[u_avatar]"  tabindex=5 onchange="PreviewAvatar();">

</td>
</tr>


<tr>
<td >自我介绍</td>
<td>
<textarea name=u_bio cols=38 rows=5  WRAP  tabindex=7>$udata[u_bio]</textarea>
</td>
</tr>
<tr><td colspan="2">
<input type="hidden" name="action" value="ed2">
<p align="center"><input type="submit" value="修改"></p>
</td></tr>
</form>
</table>
